use std::thread;

#[no_mangle]
pub extern fn process(){
    let handles:Vec<_> = (0..10).map(|_| {
        thread::spawn(|| {
            let mut x = 0;
            for _ in 0..5_000_001 {
                x +=1
            }
            println!("{}",x);
        })
    }).collect();

    for h in handles {
        h.join().ok().expect("Could not join a thread!");
    }
}